package com.jml.mayi.consumer;

import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class TopicEamilConsumer {
	@RabbitListener(
			bindings = @QueueBinding(
			value = @Queue(value = "topic_eamil_queue",durable="true"),
			exchange = @Exchange(value = "topicExchange",durable="true",type= "topic",ignoreDeclarationExceptions = "true")
	)
	)
	@RabbitHandler
	public void process(String msg) throws Exception {
		System.out.println("Topic邮件消费者获取生产者消息msg:" + msg);
	}
}
